From f066dd305bb1f6e48b7f492c56f22b8065fd510a Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Thu, 16 Sep 2004 19:09:29 +0000 Subject: [PATCH] Fix #152760, Christian Persch: 2004-09-16 Matthias Clasen Fix #152760, Christian Persch: * gtk/gtkaboutdialog.c (gtk_about_dialog_finalize): Don't free private data. (gtk_about_dialog_set_translator_credits): Recommend the msg id translator-credits. (display_credits_dialog): Show translator credits if they're translated, not if they're untranslated. --- ChangeLog | 11 +++++++++++ ChangeLog.pre-2-10 | 11 +++++++++++ ChangeLog.pre-2-6 | 11 +++++++++++ ChangeLog.pre-2-8 | 11 +++++++++++ gtk/gtkaboutdialog.c | 14 ++++++-------- 5 files changed, 50 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index a9e7924584..18175473e5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2004-09-16 Matthias Clasen + + Fix #152760, Christian Persch: + + * gtk/gtkaboutdialog.c (gtk_about_dialog_finalize): Don't free + private data. + (gtk_about_dialog_set_translator_credits): Recommend the msg + id translator-credits. + (display_credits_dialog): Show translator credits if they're + translated, not if they're untranslated. + Thu Sep 16 02:07:56 2004 Jonathan Blandford * docs/tools/widgets.c (create_icon_view): load images at normal diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index a9e7924584..18175473e5 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,14 @@ +2004-09-16 Matthias Clasen + + Fix #152760, Christian Persch: + + * gtk/gtkaboutdialog.c (gtk_about_dialog_finalize): Don't free + private data. + (gtk_about_dialog_set_translator_credits): Recommend the msg + id translator-credits. + (display_credits_dialog): Show translator credits if they're + translated, not if they're untranslated. + Thu Sep 16 02:07:56 2004 Jonathan Blandford * docs/tools/widgets.c (create_icon_view): load images at normal diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index a9e7924584..18175473e5 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,14 @@ +2004-09-16 Matthias Clasen + + Fix #152760, Christian Persch: + + * gtk/gtkaboutdialog.c (gtk_about_dialog_finalize): Don't free + private data. + (gtk_about_dialog_set_translator_credits): Recommend the msg + id translator-credits. + (display_credits_dialog): Show translator credits if they're + translated, not if they're untranslated. + Thu Sep 16 02:07:56 2004 Jonathan Blandford * docs/tools/widgets.c (create_icon_view): load images at normal diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index a9e7924584..18175473e5 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,14 @@ +2004-09-16 Matthias Clasen + + Fix #152760, Christian Persch: + + * gtk/gtkaboutdialog.c (gtk_about_dialog_finalize): Don't free + private data. + (gtk_about_dialog_set_translator_credits): Recommend the msg + id translator-credits. + (display_credits_dialog): Show translator credits if they're + translated, not if they're untranslated. + Thu Sep 16 02:07:56 2004 Jonathan Blandford * docs/tools/widgets.c (create_icon_view): load images at normal diff --git a/gtk/gtkaboutdialog.c b/gtk/gtkaboutdialog.c index 4f8834e257..9f8ca60701 100644 --- a/gtk/gtkaboutdialog.c +++ b/gtk/gtkaboutdialog.c @@ -396,9 +396,6 @@ gtk_about_dialog_finalize (GObject *object) g_strfreev (priv->documenters); g_strfreev (priv->artists); - g_free (priv); - about->private_data = NULL; - G_OBJECT_CLASS (gtk_about_dialog_parent_class)->finalize (object); } @@ -1166,11 +1163,11 @@ gtk_about_dialog_get_translator_credits (GtkAboutDialog *about) * Using gettext(), a simple way to achieve that is to mark the * string for translation: * - * gtk_about_dialog_set_translator_credits (about, _("translator_credits")); + * gtk_about_dialog_set_translator_credits (about, _("translator-credits")); * - * It is a good idea to use the customary msgid "translator_credits" for this + * It is a good idea to use the customary msgid "translator-credits" for this * purpose, since translators will already know the purpose of that msgid, and - * since #GtkAboutDialog will detect if "translator_credits" is untranslated + * since #GtkAboutDialog will detect if "translator-credits" is untranslated * and hide the tab. * * Since: 2.6 @@ -1689,9 +1686,10 @@ display_credits_dialog (GtkWidget *button, if (priv->documenters != NULL) add_credits_page (about, notebook, _("Documented by"), priv->documenters); + /* Don't show an untranslated gettext msgid */ if (priv->translator_credits != NULL && - !strcmp (priv->translator_credits, "translator_credits") && - !strcmp (priv->translator_credits, "translator-credits")) + strcmp (priv->translator_credits, "translator_credits") && + strcmp (priv->translator_credits, "translator-credits")) { gchar *translators[2]; -- 2.30.2